Skip to main content

Unit 2 Exercise 11

Exercise 11: Looping Jobs

Objective

Utilize the Restart settings to create a Looping Job.

Summary

Utilizing the schedule, My First Schedule, you will add a looping job that will restart multiple times after each run Finishes OK.

Instructions

Create a Looping Job

  1. In Studio, select the My First Schedule
  2. Click the View button.
  3. In the side menu, select Add Job.
  4. Validate that My First Schedule is in the Schedule field.
  5. In the Name textbox, enter Looping Job.
  6. In the Job Type drop-down, select Windows.
  7. Expand the Task Details section to open the Details box.
  8. In the Machine Selection section, select the SMATraining machine from the Machines or Machine Group drop down.
  9. In the General section, select SMATRAINING\SMAUSER from the User Id drop down.
  10. Under the Run section, type the following in the Command Line box:.
"C:\Program Files\OpConxps\MSLSAM\genericp.exe" -t10
  1. Click the Save button.
  2. Click the Lock button to enter Admin Mode.
  3. Expand the Frequency section, if not already expanded.
  4. Select the Example-Mon-Sun-0 frequency in the Inactive column.
  5. Using the < move the frequency into the Active column.
  6. In the Active column, select the frequency you just added.
  7. Scroll down to the When Job Finishes Ok section
  • In the Run Again drop-down, select Restart Offset.
  • In the Run Interval drop down, select Minutes from Start to Start.
  • In the Value field, enter 15.
  • In the Number of Runs field, enter 4.
  1. Click Save.
  2. Close Studio.

Add the Job to the Daily

  1. In Operations, click on Processes in the top right corner.
  2. In the Date section, select today's date.
  3. In the Schedule section, right-click on My First Schedule.
  4. In the Schedule Selection window, click the + sign.
  5. In the Add Job(s) for... pop-up window, select the Looping Job and click Next.
  6. On the next screen, click the Release radial button then click Next.
  7. On the next screen, click Submit.
  8. Click Close.
  9. In the Job section, you should see the job and it should run successfully.
info

The Looping Job will probably look like it is stuck in the "Wait Start Time" state but if you look at the Return Code column, you should see all zeros (0000000000).

  1. Close Operations.

Enterprise Manager

Details
  1. Multiple Frequencies
  • Create a new Schedule.
  • Add a Null Job and setup Frequencies allowing a Job to run on the 15th of the month (working day before) and the last business day of the month.
    • Schedule - 5 Day Work Week
    • The Job runs at 20:00 when it is not the last day of the month and 18:00 when it is the last business day of the month.
  • Use the Forecast All Button to view both Frequencies.
    • The first listed will be Green and the second will be Yellow.
  1. Negative Frequencies
  • In a new Null Job (same Schedule), set up Frequencies allowing the Job to run every day of the month, Monday through Friday, unless it is a Holiday or the last Day of the Month.

  • Use the Forecast All Button to view both Frequencies.

    note

    The Negative Frequency will appear purple